﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SamplingInspection.aspx.cs"
    Inherits="PPAP.Web.SearchReport.SamplingInspection" %>

<%@ Register Assembly="PPAP.WebControls" Namespace="PPAP.WebControls" TagPrefix="cc1" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script language="javascript">
        function add() {
            url = "PPAPTasksEdit.aspx";
            PopUpWindow(url, 400, 150, 580, 400);
        }
        function edit(id, sid) {
            url = "../todolist/SampleCardWeb.aspx?RID=" + id + "&SID=" + sid + "&his=1";
            window.location.href = url;
        }
    </script>
</head>
<body>
    <form id="Form1" runat="server">
    <div>
        <font size='-1' color='gray'>Current position:Search>>Sample card</font>
        <table width="950px" style="border-color: #2A48CE; border: 1px; border-style: solid;
            border-color: Gray; border-spacing: 0px;">
            <tr style="height: 32px;">
                <td style="font-weight: bold;" bgcolor="#D7D7D7" colspan="4">
                    &nbsp; Filter SET
                </td>
            </tr>
            <tr>
                <td style="width: 12%; font-weight: bold; color: #2E8AC5;">
                    &nbsp; Part No.:
                </td>
                <td style="width: 38%;">
                    <cc1:PartNo ID="tbPartno" runat="server" Width="50px"></cc1:PartNo>
                </td>
                <td style="width: 12%; font-weight: bold; color: #2E8AC5;">
                    Part name:
                </td>
                <td style="width: 38%;">
                    <asp:TextBox ID="txtPartName" autocomplete="off" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td style="font-weight: bold; color: #2E8AC5;">
                    &nbsp; Color:
                </td>
                <td>
                    <asp:TextBox ID="txtColor" autocomplete="off" runat="server"></asp:TextBox>
                </td>
                <td style="font-weight: bold; color: #2E8AC5;">
                    Sample card No.:
                </td>
                <td>
                    <asp:TextBox ID="txtSampleCardNo" autocomplete="off" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td style="font-weight: bold; color: #2E8AC5;">
                    &nbsp; Supplier name:
                </td>
                <td>
                    <asp:TextBox ID="txtSupplierName" autocomplete="off" runat="server"></asp:TextBox>
                </td>
                <td style="font-weight: bold; color: #2E8AC5;">
                    Supplier code:
                </td>
                <td>
                    <asp:TextBox ID="tbSupplierNo" autocomplete="off" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td style="font-weight: bold; color: #2E8AC5;">
                    &nbsp; Create from:
                </td>
                <td style="font-weight: bold; color: #2E8AC5;">
                    <cc1:My97 ID="dpStartTime1" runat="server"></cc1:My97>
                    to:<cc1:My97 ID="dpStartTime2" runat="server"></cc1:My97>
                </td>
                <td style="font-weight: bold; color: #2E8AC5;">
                    End time(planned):
                </td>
                <td style="font-weight: bold; color: #2E8AC5;">
                    <cc1:My97 ID="dpEndTime1" runat="server"></cc1:My97>
                    to:<cc1:My97 ID="dpEndTime2" runat="server"></cc1:My97>
                </td>
            </tr>
            <tr>
                <td style="font-weight: bold; color: #2E8AC5;">
                    &nbsp; Sample card:
                </td>
                <td>
                    <asp:DropDownList ID="ddlDept" runat="server" Width="155px">
                    </asp:DropDownList>
                </td>
                <td style="font-weight: bold; color: #2E8AC5;">
                    Responsible person:
                </td>
                <td>
                    <asp:TextBox ID="tbDeptRep" autocomplete="off" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td style="font-weight: bold; color: #2E8AC5;">
                    &nbsp; Status:
                </td>
                <td>
                    <asp:DropDownList ID="ddlStatus" runat="server" Width="155px">
                        <asp:ListItem Value="-1">All</asp:ListItem>
                        <asp:ListItem Value="0">Created</asp:ListItem>
                        <asp:ListItem Value="1">Circulating</asp:ListItem>
                        <asp:ListItem Value="2">Circulating(Reject)</asp:ListItem>
                        <asp:ListItem Value="3">Decided</asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td style="font-weight: bold; color: #2E8AC5;">
                    Result:
                </td>
                <td>
                    <asp:DropDownList ID="ddlResult" runat="server" Width="155px">
                        <asp:ListItem Value="">All</asp:ListItem>
                        <asp:ListItem Value="G">Green</asp:ListItem>
                        <asp:ListItem Value="Y">Yellow</asp:ListItem>
                        <asp:ListItem Value="R">Red</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td style="font-weight: bold; color: #2E8AC5;">
                    &nbsp; Overdue:
                </td>
                <td>
                    <asp:RadioButton ID="RadioButton3" runat="server" Text="Yes" GroupName="b" />
                    &nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:RadioButton ID="RadioButton4" runat="server" Text="No" GroupName="b" />
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:RadioButton ID="RadioButton6" runat="server" Text="All" GroupName="b" Checked="True" />
                </td>
                <td style="font-weight: bold; color: #2E8AC5;">
                    PPAR No.:
                </td>
                <td>
                    <asp:TextBox ID="txtPPARNO" autocomplete="off" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr >
                <td style="font-weight: bold; color: #2E8AC5;">
                    &nbsp; Finished:
                </td>
                <td>
                 <asp:RadioButton ID="RadioButton1" runat="server" Text="Yes" GroupName="f" />
                    &nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:RadioButton ID="RadioButton2" runat="server" Text="No" GroupName="f" />
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:RadioButton ID="RadioButton5" runat="server" Text="All" GroupName="f" Checked="True" />
                </td>
                <td>
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr style="height: 32px;">
                <td align="left" colspan="2" style="font-weight: bold; color: #2E8AC5;">
                    &nbsp;
                    <asp:CheckBox ID="chkMycase" runat="server" Text="My case" />
                </td>
                <td align="center">
                    &nbsp;
                </td>
                <td align="right" style="padding-right: 30px;">
                    <asp:Button ID="btnSubmit" CssClass="button" runat="server" Text="Search" OnClick="btnSubmit_Click" />
                    &nbsp;
                    <asp:Button ID="btnExport" CssClass="button" runat="server" Text="Export" OnClick="btnExport_Click" />
                </td>
            </tr>
        </table>
        <br />
        <asp:DataGrid ID="dgList" HeaderStyle-BackColor="#2E8AC5" HeaderStyle-Font-Bold="true"
            HeaderStyle-Height="32px" Width="100%" AllowSorting="true" OnLoad="dgLoad" AutoGenerateColumns="False"
            runat="server" OnSortCommand="dgList_SortCommand">
            <Columns>
                <asp:BoundColumn DataField="rownum" HeaderText="No." FooterText="No.">
                    <ItemStyle HorizontalAlign="Left"></ItemStyle>
                </asp:BoundColumn>
                <asp:BoundColumn DataField="PPARNo" SortExpression="PPARNo" HeaderText="PPAR No."
                    FooterText="PPAR No.">
                    <ItemStyle HorizontalAlign="Left"></ItemStyle>
                </asp:BoundColumn>
                <asp:BoundColumn DataField="BDNTPartNo" SortExpression="BDNTPartNo" HeaderText="Part No."
                    FooterText="Part No.">
                    <ItemStyle HorizontalAlign="Left"></ItemStyle>
                </asp:BoundColumn>
                <asp:BoundColumn DataField="bdntpartname" SortExpression="bdntpartname" HeaderText="Part name"
                    FooterText="Part name">
                    <ItemStyle HorizontalAlign="Left"></ItemStyle>
                </asp:BoundColumn>
                <asp:BoundColumn DataField="color" SortExpression="color" HeaderText="Color" FooterText="Color">
                    <ItemStyle HorizontalAlign="Left"></ItemStyle>
                </asp:BoundColumn>
                <asp:BoundColumn DataField="SupplierCode" SortExpression="SupplierCode" HeaderText="Suppiler code"
                    FooterText="Suppiler code">
                    <ItemStyle HorizontalAlign="Left"></ItemStyle>
                </asp:BoundColumn>
                <asp:BoundColumn DataField="SampleCardNo" SortExpression="SampleCardNo" HeaderText="Sample card No."
                    FooterText="Sample card No.">
                    <ItemStyle HorizontalAlign="Left"></ItemStyle>
                </asp:BoundColumn>
                <asp:BoundColumn DataField="testitemname" SortExpression="testitemname" HeaderText="Sample card"
                    FooterText="Sample card">
                    <ItemStyle HorizontalAlign="Left"></ItemStyle>
                </asp:BoundColumn>
                 <asp:BoundColumn DataField="qeuser" SortExpression="qeuser" HeaderText="Sample card started by"
                    FooterText="Sample card started by">
                    <ItemStyle HorizontalAlign="Left"></ItemStyle>
                </asp:BoundColumn>
                <asp:BoundColumn DataField="DeptRep" SortExpression="DeptRep" HeaderText="Responsible person"
                    FooterText="Responsible person">
                    <ItemStyle HorizontalAlign="Left"></ItemStyle>
                </asp:BoundColumn>
                <asp:BoundColumn DataField="ShowStatus" HeaderText="Status" FooterText="Status">
                    <ItemStyle HorizontalAlign="Left"></ItemStyle>
                </asp:BoundColumn>
                <asp:BoundColumn DataField="Result" SortExpression="Result" HeaderText="Result" FooterText="Result">
                    <ItemStyle HorizontalAlign="Left"></ItemStyle>
                </asp:BoundColumn>
                <asp:TemplateColumn HeaderText="Start time" FooterText="Start time" SortExpression="starttime">
                    <ItemStyle HorizontalAlign="Left"></ItemStyle>
                    <ItemTemplate>
                        <asp:Label ID="Label7" runat="server" Text='<%#Eval("starttime").ToString()==""?"":DateTime.Parse(Eval("starttime").ToString()).ToString("yyyy-MM-dd")  %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateColumn>
                <asp:TemplateColumn HeaderText="End time(planned)" FooterText="End time(planned)"
                    SortExpression="endtimeplan">
                    <ItemStyle HorizontalAlign="Left"></ItemStyle>
                    <ItemTemplate>
                        <asp:Label ID="Label8" runat="server" Text='<%#Eval("endtimeplan").ToString()==""?"":DateTime.Parse(Eval("endtimeplan").ToString()).ToString("yyyy-MM-dd")  %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateColumn>
                <asp:TemplateColumn HeaderText="End time(actual)" FooterText="End time(actual)" SortExpression="endtimeactual">
                    <ItemStyle HorizontalAlign="Left"></ItemStyle>
                    <ItemTemplate>
                        <asp:Label ID="Label9" runat="server" Text='<%#Eval("endtimeactual").ToString()==""?"":DateTime.Parse(Eval("endtimeactual").ToString())<DateTime.Parse("1900-02-01")?"":DateTime.Parse(Eval("endtimeactual").ToString()).ToString("yyyy-MM-dd")  %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateColumn>
                <asp:TemplateColumn HeaderText="View" FooterText="View" HeaderStyle-HorizontalAlign="Left"
                    ItemStyle-HorizontalAlign="Left">
                    <ItemTemplate>
                        <img src="../Images/newimg/write.png" title="View" onclick="<%#"javascript:edit("+Eval("rid")+","+Eval("ID")+");" %>" />
                    </ItemTemplate>
                </asp:TemplateColumn>
            </Columns>
            <HeaderStyle BackColor="#E7E8E8" Font-Bold="True" Height="32px"></HeaderStyle>
        </asp:DataGrid>
        <webdiyer:AspNetPager ID="AspNetPager2" runat="server" CssClass="paginator" ShowPageIndexBox="Always"
            PageIndexBoxType="DropDownList" TextBeforePageIndexBox="goto" HorizontalAlign="Center"
            PageSize="20" EnableTheming="true" AlwaysShow="True" FirstPageText="|&lt;" LastPageText="&gt;|"
            NextPageText="&gt;" PrevPageText="&lt;" SubmitButtonText="Go" TextAfterPageIndexBox="page"
            InvalidPageIndexErrorMessage="Page index is not effective numerical！" OnPageChanged="AspNetPager2_PageChanged"
            PageIndexOutOfRangeErrorMessage="Page index beyond range" BackColor="#E7E8E8">
        </webdiyer:AspNetPager>
    </div>
    </form>
</body>
</html>
